Wait for device-bringup inside domain_start, outside the scope of the
authorEwan Mellor <ewan@xensource.com>
Tue, 28 Nov 2006 18:00:45 +0000 (18:00 +0000)
committerEwan Mellor <ewan@xensource.com>
Tue, 28 Nov 2006 18:00:45 +0000 (18:00 +0000)
domains_lock.  This makes the VM.start call blocking, but allows xm list to
work while it is blocked.  Move the handling of start_paused out of
XendDomainInfo.start as part of this.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
tools/python/xen/xend/XendDomain.py
tools/python/xen/xend/XendDomainInfo.py

index 27b3a1b857565415aa870c54231cd749384c5ea3..839acc8da66ddf740bef341c27eb26b0cadcdb4f 100644 (file)
@@ -908,10 +908,13 @@ class XendDomain:
             if dominfo.state != DOM_STATE_HALTED:
                 raise XendError("Domain is already running")
             
-            dominfo.start(is_managed = True, start_paused = start_paused)
+            dominfo.start(is_managed = True)
             self._add_domain(dominfo)
         finally:
             self.domains_lock.release()
+        dominfo.waitForDevices()
+        if not start_paused:
+            dominfo.unpause()
         
 
     def domain_delete(self, domid):
index 70535174aad72f5c10f4103b4cefc77f0a9d752f..26428a0304d58792c26090659469d9636d2c0bd9 100644 (file)
@@ -425,7 +425,7 @@ class XendDomainInfo:
     #
 
 
-    def start(self, is_managed = False, start_paused = True):
+    def start(self, is_managed = False):
         """Attempts to start the VM by do the appropriate
         initialisation if it not started.
         """
@@ -439,8 +439,6 @@ class XendDomainInfo:
                 self._storeDomDetails()
                 self._registerWatches()
                 self.refreshShutdown()
-                if not start_paused:
-                    self.unpause()
 
                 # save running configuration if XendDomains believe domain is
                 # persistent